System and method for global-to-local shape matching for automatic liver segmentation in medical imaging

ABSTRACT

A method for automatically segmenting a liver in digital medical images includes providing a 3-dimensional (3D) digital image I and a set of N training shapes {φ i } i=1, . . . , N  for a liver trained from a set of manually segmented images, selecting a seed point to initialize the segmentation, representing a level set function φ α (θx+h) of a liver boundary Γ in the image as 
                     ϕ   α     ⁡     (   x   )       =       ϕ   0     +       ∑     i   =   1     n     ⁢       α   i     ⁢       V   i     ⁡     (   x   )               ,     
     ⁢   where     ⁢                           ϕ   0     ⁡     (   x   )       =       1   N     ⁢       ∑     i   =   1     N     ⁢       ϕ   i     ⁡     (   x   )                 
is a mean shape, {V i (x)} i=1, . . . , n  are eigenmodes where n&lt;N, α i  are shape parameters, and h ε R 3  and θ ε [0,2π] 3  are translation and rotation parameters that align the training shapes, minimizing a first energy functional to determine the shape, translation, and rotation parameters to determine a shape template for the liver segmentation, defining a second energy functional of the shape template and a registration mapping weighted by image intensity histogram functions inside and outside the boundary, and minimizing the second energy functional to determine the registration mapping, where the registration mapping recovers local deformations of the liver.

CROSS REFERENCE TO RELATED UNITED STATES APPLICATIONS

This application claims priority from “Global-to-Local Shape Matching for Liver Segmentation in CT Imaging”, U.S. Provisional Application No. 60/957,026 of Saddi, et al., filed Aug. 21, 2007, the contents of which are herein incorporated by reference in their entireties.

TECHNICAL FIELD

This disclosure is directed to liver segmentation in digital medical images.

DISCUSSION OF THE RELATED ART

Medical computer-aided diagnosis based on computed tomography (CT) has gained significant attention. Such a procedure typically requires the extraction of anatomical structures. In particular, current methods for liver diagnosis involve its boundary extraction. This task is quite challenging because the liver tissue and other adjacent organs are characterized by very similar densities (Hounsfield units) in CT images. Moreover, partial-volume effects make the observation of intensity discontinuities challenging, resulting in weak edges. To resolve this lack of information, shape models can be employed, but again, challenges arise due to the large inter-patient liver shape variability.

While most liver segmentation tools available to clinicians still require a time-consuming human interaction, there have been proposals to automate this process to make it more usable in clinical applications. One technique uses a cascading segmentation framework that sequentially detects different hepatic structures for surgery planning where the liver is extracted by deforming globally and locally a given template. Another technique uses a probabilistic atlas to classify voxel intensities in abdominal CT images. More recently, a trend toward the use of 3D shape models has emerged. One example built a statistical shape model composed of 43 segmented livers and used a modified Active Shape Model (ASM) for segmentation. A similar approach used a shape constrained deformable model rather than the usual ASM fitting approach. This allowed capturing shape variations that were not present in the training set. A detailed validation shows the improvement in accuracy with respect to ASM. This illustrates that relying too much on a prior shape model gives robust segmentation algorithms but generally has low accuracy. This is due to the large inter-patient shape variability of the liver which cannot be modeled from a reduced number of training samples. In practice, each liver shape has a particular geometry, and only global shape characteristics remain consistent from one patient to another.

SUMMARY OF THE INVENTION

Exemplary embodiments of the invention as described herein generally include methods and systems for a two-phase segmentation of the liver in CT images. First, the pose and global shape properties are estimated using a statistical shape model defined in a low dimensional space spanned by a training set of shapes. The shape-based step allows estimation of the pose and the global shape properties of the liver with good robustness. Then, a template matching procedure is applied to recover local deformations that were not present in the learning set. This non-rigid shape matching can recover local shape properties. In addition to a global regularization on the shape, a non-rigid template registration method according to an embodiment of the invention can preserve the topology of the liver even for large shape variations. Both of these steps are formulated in a variational framework that optimizes the same image term: the likelihood of the intensity inside the region of interest and its background. A method according to an embodiment of the invention is initialized using a single point inside the liver that can be found automatically. This global-to-local strategy can recover livers with peculiar shapes in arbitrary poses. Results are presented on wide range of images, some with problematic attributes like developed tumors.

According to an aspect of the invention, there is provided a method for automatically segmenting a liver in digital medical images, including providing a 3-dimensional (3D) digital image I to be segmented, the image comprising a plurality of intensities associated with a 3D grid of points, providing a set of N training shapes {φ_(i)}_(i=1, . . . ,N) for a liver trained from a set of manually segmented images, selecting a seed point to initialize the segmentation, representing a level set function φ_(α)(θx+h) of a liver boundary Γ in the image as

${{{\phi_{\alpha}(x)} = {\phi_{0} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}(x)}}}}},{where}}\mspace{14mu}$ ${\phi_{0}(x)} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}$ is a mean shape, {V_(i)(x)}_(i=1, . . . ,n) are eigenmodes where n<N, α_(i) are shape parameters corresponding to each training shape φ_(i), and h ε R³ and θ ε [0,2π]³ are translation and rotation parameters that align the training shapes, defining a first energy functional in terms of the level set functions φ_(α)(θx+h), minimizing the first energy functional to determine the shape, translation, and rotation parameters, where the shape, translation, and rotation parameters determine a shape template for the liver segmentation, defining a second energy functional of the shape template and a registration mapping weighted by image intensity histogram functions inside and outside the boundary, and minimizing the second energy functional to determine the registration mapping, where the registration mapping recovers local deformations of the liver.

According to a further aspect of the invention, the first energy functional is

${E\left( {\alpha,h,\theta} \right)} = {{- {\int_{\Omega}{\begin{pmatrix} {{H\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)\log\;{p_{i\; n}\left( {I(x)} \right)}} +} \\ {\left( {1 + {H\left( {\phi\;{\alpha\left( {{\theta\; x} + h} \right)}} \right)}} \right)\log\;{p_{out}\left( {I(x)} \right)}} \end{pmatrix}\ {\mathbb{d}x}}}} - {\log\left( {\frac{1}{\sqrt{2\pi}N\;\sigma}{\sum\limits_{i = 1}^{N}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma}} \right)}}} \right)}}$ where H is a Heaviside function whose value is 1 inside the boundary and 0 otherwise, the log term is a shape prior distribution with standard deviation σ, and p_(in), p_(out) are image intensity histogram functions inside and outside the boundary, respectively.

According to a further aspect of the invention, the method includes setting σ to twice an average Euclidean distance between each training shape and its closest neighbor in a subspace with dimension n.

According to a further aspect of the invention, minimizing the first energy functional comprising initializing the shape parameters α_(i) to a mean shape, and solving

$\quad\left\{ \begin{matrix} {\frac{\mathbb{d}\alpha}{\mathbb{d}t} = {{\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{V\left( {{\theta\; x} + h} \right)}{e(x)}{\mathbb{d}x}}} + {\frac{1}{\sigma^{2}}\frac{\sum\limits_{i = 1}^{N}{\left( {\alpha_{i} - \alpha} \right)K_{i}}}{\sum\limits_{i = 1}^{N}K_{i}}}}} \\ {\frac{\mathbb{d}h}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}}{e(x)}\ {\mathbb{d}x}}}} \\ {\frac{\mathbb{d}\theta}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}\left( {{{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}} \cdot {\nabla_{\theta}\theta}}\; x} \right){e(x)}{\mathbb{d}x}}}} \end{matrix} \right.$ with a finite difference scheme, where δ is a Dirac delta function,

${{{\mathbb{e}}(x)} = {\log\left\lbrack \frac{p_{out}\left( {I(x)} \right)}{p_{i\; n}\left( {I(x)} \right)} \right\rbrack}},{K_{i} = {\frac{1}{\sqrt{2\;\pi}}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}},{{{and}\mspace{14mu} V} = \left( {V_{1},\ldots\mspace{14mu},V_{i\; n}} \right)},$ and restricting computations to a narrow band around a zero crossing of φ_(α).

According to a further aspect of the invention, the second energy functional is E _(data)(I _(T)∘ψ)=−∫_(Ω)((I _(T)∘ψ)log_(in) p(I(x))+(1−I _(T)∘ψ)log p _(out)(I(x)))dx, where ψ:Ω→Ω is a registration transformation on a domain Ω of the image I, I_(T)(X)=H(φ_(α)(θx+h)), I_(T)∘ψ is a warped binary template, ∘ is the composition operator, and p_(in), p_(out) are the image intensity histogram functions inside and outside the boundary, respectively.

According to a further aspect of the invention, minimizing the second energy functional comprises building a sequence of transformations (ψ_(k))_(k=0, . . . , +∞) that approximate ψ by composition of small displacements. ψ_(k+1)=ψ_(k)∘(ψ_(id) +βv _(k)), where ψ_(k) is initialized to ψ₀=ψ_(id), the registration identity transformation, v_(k) is a velocity vector field defined from

${v = {{\nabla\left( {I_{T} \cdot \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}},$ and β is a displacement coefficient.

According to a further aspect of the invention, the method includes regularizing v_(k) with a recursive Gaussian filter.

According to a further aspect of the invention, the method includes adjusting the value of β to an inverse of a maximum norm of the vector field v_(k).

According to a further aspect of the invention, the method includes computing

${{p_{i\; n}(i)} = {\frac{1}{\Omega_{i\; n}}{\int_{\Omega}{\left( {I_{T} \cdot \psi} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},{{p_{out}(i)} = {\frac{1}{\Omega_{out}}{\int_{\Omega}{\left( {1 - {I_{T} \cdot \psi}} \right){\delta\left( {{I(x)} - i} \right)}{\mathbb{d}x}}}}},$ inside and outside the boundary, where δ is a Dirac delta function, i is an image intensity value and |Ω_(in)|, |Ω_(out)| are volumes of corresponding domains inside and outside the boundary.

According to a further aspect of the invention, the method includes embedding the minimization of the second energy functional in a coarse-to-fine strategy, where a coarse resolution solution from one step is used to initialize a finer resolution solution at a next step.

According to a further aspect of the invention, n is determined by analyzing the eigenvalues to include those eigenmodes that contribute a predetermined percentage to the level set function φ_(α).

According to a further aspect of the invention, selecting a seed point comprises computing an intensity histogram of the image, fitting a Gaussian mixture distribution to the intensity histogram to compute a mask corresponding to a liver intensity, convolving the mask with a Gaussian kernel with a standard deviation proportional to a size of the liver, and selecting a pixel with a highest response the seed point.

According to another aspect of the invention, there is provided a program storage device readable by a computer, tangibly embodying a program of instructions executable by the computer to perform the method steps for automatically segmenting a liver in digital medical images.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a table showing the segmentation comparison scores for every image in the training set for each of the segmentation methods being compared, according to an embodiment of the invention.

FIG. 2 is a table illustrating the average metrics and scores of the segmentation methods being compared, according to an embodiment of the invention.

FIG. 3 is a table showing the metrics and the scores compared to the ground-truth for all test cases, according to an embodiment of the invention.

FIG. 4 depicts the results of three different segmentations in three different views, according to an embodiment of the invention.

FIGS. 5 a-b is a flowchart of a method for liver segmentation in digital medical images, according to an embodiment of the invention.

FIG. 6 is a block diagram of an exemplary computer system for implementing a method for liver segmentation in digital medical images, according to an embodiment of the invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Exemplary embodiments of the invention as described herein generally include systems and methods for liver segmentation in digital medical images. Accordingly, while the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that there is no intent to limit the invention to the particular forms disclosed, but on the contrary, the invention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

As used herein, the term “image” refers to multi-dimensional data composed of discrete image elements (e.g., pixels for 2-D images and voxels for 3-D images). The image may be, for example, a medical image of a subject collected by computer tomography, magnetic resonance imaging, ultrasound, or any other medical imaging system known to one of skill in the art. The image may also be provided from non-medical contexts, such as, for example, remote sensing systems, electron microscopy, etc. Although an image can be thought of as a function from R³ to R, the methods of the inventions are not limited to such images, and can be applied to images of any dimension, e.g., a 2-D picture or a 3-D volume. For a 2- or 3-dimensional image, the domain of the image is typically a 2- or 3-dimensional rectangular array, wherein each pixel or voxel can be addressed with reference to a set of 2 or 3 mutually orthogonal axes. The terms “digital” and “digitized” as used herein will refer to images or volumes, as appropriate, in a digital or digitized format acquired via a digital acquisition system or via conversion from an analog image.

Statistical Region-Based Model

Let I:Ω→R be the image to segment. One defines p_(in)(i) and p_(out)(i) as the probability density functions of a random variable modeling intensity values i=I(x) in the regions Ω_(in) and Ω_(out) inside and outside the liver, respectively. Given this model, the optimal closed boundary Γ can be obtained using a maximum likelihood principle, minimizing the following energy: E _(data)(Γ)=−∫_(Ω)(χ(x,Γ)log p _(in)(I(x))+(1−χ(x,Γ))log p _(out)(I(x)))dx   (1) where shape function χ(x,Γ)=1 if x is inside Γ and 0 otherwise.

In a level set framework, the evolving contour Γ is represented as the zero level line of a signed function φ:Ω→R, i.e. Γ={x ε Ω|φ(x)=0}. Letting H(φ) be the Heaviside function,

${H(\phi)} = \left\{ \begin{matrix} {1,} & {{{{if}\mspace{14mu}\phi} \geq 0},} \\ {0,} & {{otherwise},} \end{matrix} \right.$ the energy to be minimized can be expressed as follows: E(φ)=−∫_(Ω)[H(φ)log p _(in)(I(x))+(1−H(φ))log p _(out)(I(x))+v|∇H(φ)|]dx, where v|∇H(φ)| is a regularization term on the contour length. This energy is typically minimized by gradient descent. For this purpose, one defines a time dependent family of functions t

φ(t) solutions of the following PDE:

$\frac{\partial{E(\phi)}}{\partial t} = {{\delta(\phi)}\left( {{\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} + {v\;{{div}\left( \frac{\nabla\phi}{{\nabla\phi}} \right)}}} \right)}$ that corresponds to an evolution of the contour Γ. The first term accounts for the intensity likelihood for each region. The second term is the regularization of the contour.

There are different strategies to minimize this energy and obtain a region segmentation. A direct solution is to evolve the above level set representation of the boundary but, as is seen in the experimental results presented below, this has several drawbacks. According to an embodiment of the invention, an alternative minimization comprises first constraining Γ with a given shape model and then using a template registration formulation to locally refine the solution. The intensity distributions p_(in)(i) and p_(out)(i) are estimated dynamically during the optimization process according to the intensity histograms inside each region for fixed positions of the boundary.

Shape Model

According to an embodiment of the invention, the boundary Γ can be constrained by a shape model trained from a set of manually segmented images. Given a set of N training shapes encoded by their signed distance functions {φ_(i)}_(i=1, . . . , N), the segmentation task can be reduced to a finite-dimensional optimization by constraining the task to the subspace spanned by the training shapes.

Given a distance d on the space of signed distance functions defined by d²(φ_(i), φ_(j))=∫_(Ω)(φ_(i)(x)−φ_(i)(x))²dx, the set of training shapes is aligned with respect to translation and rotation. Γ is defined as the zero crossing of a level set function φ defined in the image domain. The level set representation φ of the boundary Γ is then constrained to a parametric representation of the form:

$\begin{matrix} {{{\phi_{\alpha}\left( {{\theta\; x} + h} \right)} = {{\phi_{0}\left( {{\theta\; x} + h} \right)} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}\left( {{\theta\; x} + h} \right)}}}}},} & (2) \end{matrix}$ where

${\phi_{0}(x)} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}$ represents the mean shape, {V_(i)(x)}_(i=1, . . . , n) are the eigenmodes, and n<N is the dimension of the subspace spanned by the N training shapes. The parameter vector α=(α₁, . . . , α_(n)) models the shape deformations, while the parameters h ε R³ and θ ε [0,2π]³ model translation and rotation of the shape.

One way to choose the value of n is by examining the eigenvalues of the corresponding eigenvectors. In some sense, the size of each eigenvalue indicates the amount of influence or importance its corresponding eigenvector has in determining the shape. One could determine the threshold for determining the value of n by looking at a histogram of the eigenvalues and selecting those eigenvalues that contribute most to the shape. However, this approach would be challenging to implement as the threshold value for n varies for each application. There is no universal n that can be set.

Each training shape φ_(i) can be represented by its corresponding shape vector α_(i). Statistical shape learning infers a statistical distribution P(α) from these sample shapes, using a nonparametric density approximation:

$\begin{matrix} {{P(\alpha)} = {\frac{1}{N\;\sigma\sqrt{2\;\pi}}{\sum\limits_{i = 1}^{N}{{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}.}}}} & (3) \end{matrix}$ Constraining the boundary Γ to this subspace, Γ car be represented by a shape vector α, i.e. Γ is the zero crossing of the level set function φ_(α). According to an embodiment of the invention, σ can be set to twice the average of the Euclidean distance between each training shape and its closest neighbor in the subspace with dimension n. Every training shape is a vector of dimension n that represent the number of variation modes.

One can express the shape function χ(θx+h, Γ) in terms of the Heaviside function H as H(φ_(α)(θx+h)). Using the short hand H_(φ)=H(φ_(α)(θx+h)), EQ. (1) can be rewritten as: E _(data)(α,h,θ)=−∫_(Ω)(H _(φ) log p _(in)(I(x))+(1−H _(φ))log p _(out)(I(x)))dx.   (4)

Incorporating the prior on the distribution of the shape vector α in the energy leads to a final criteria: E(α,h,θ)=−log P(α)+E _(data)(α,h,θ).   (5)

This energy can be minimized using alternated gradient descents with respect to each unknown parameters α, h and θ to solve for α, h and θ. With

${{{\mathbb{e}}(x)} = {\log\left\lbrack \frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)} \right\rbrack}},{K_{i} = {\frac{1}{\sqrt{2\;\pi}}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}}$ and V=(V₁, . . . , V_(n)), the following system of coupled gradient descent equations is obtained:

$\begin{matrix} \left\{ \begin{matrix} {\frac{\mathbb{d}\alpha}{\mathbb{d}t} = {{\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{V\left( {{\theta\; x} + h} \right)}{e(x)}\ {\mathbb{d}x}}} + {\frac{1}{\sigma^{2}}\frac{\sum\limits_{i = 1}^{N}{\left( {\alpha_{i} - \alpha} \right)K_{i}}}{\sum\limits_{i = 1}^{N}K_{i}}}}} \\ {\frac{\mathbb{d}h}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}}{e(x)}\ {\mathbb{d}x}}}} \\ {\frac{\mathbb{d}\theta}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}\left( {{{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}} \cdot {\nabla_{\theta}\theta}}\; x} \right){e(x)}\ {\mathbb{d}x}}}} \end{matrix} \right. & (6) \end{matrix}$ These equations can be solved by initializing the shape α with the mean shape (α=0) and the transformation parameters h and θ with some reasonable estimates. Subsequently, the above partial differential equations are discretized by a finite difference scheme. Note that in all equations, the Dirac delta function δ appears as factor inside the integrals over the image domain. This allows restricting all computations to a narrow band around the zero crossing of φ. While the evolution of translation and pose parameters h and θ are merely driven by the data term e(x), the shape vector a is additionally drawn towards each training shape with a strength that decays exponentially with the distance to the respective shape. Template Matching

According to an embodiment of the invention, a template matching algorithm that recovers local deformations of the shape obtained in the previous section can be used to refine the segmentation. Consider a registration framework, in which the template matching can be formulated as finding a transformation ψ:Ω→Ω that minimizes the cost functional E_(data)(I_(T)∘ψ) defined in EQ. (1), where I_(T)(x)=χ(x,Γ)=H(φ_(α)(θx+h)) is the shape represented by a binary template obtained from EQ. (5). Thus, the following energy is minimized to find ψ: E _(data)(I _(T)∘ψ)=−∫₁₀₆((I _(T)∘ψ)log_(in) p(I(x))+(1−I _(T)∘ψ)log p _(out)(I(x)))dx.   (7) In this equation, I_(T)∘ψ is the warped binary template and ∘ the composition operator. Since I_(T) has been obtained by solving EQ. 5, it is desired to find an optimal transformation ψ. The derivation of the energy leads to the following gradient descent:

$\begin{matrix} {\frac{\partial{E_{data}\left( {I_{T} \cdot \psi} \right)}}{\partial\psi} = {{\nabla\left( {I_{T} \cdot \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}} & (8) \end{matrix}$ In non-rigid registration, deriving this energy according to a high-dimensional transformation results in a vector field

$v = {{\nabla\left( {I_{T} \cdot \psi} \right)}{\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right).}}$ To guarantee a well-posed problem, this vector field should be regularized.

To find an optimal high-dimensional transformation, one builds a sequence of transformations (ψ_(k))_(k=0, . . . , +∞), by composition of small displacements, ψ_(k+1)=ψ_(k)∘(ψ_(id) +βv _(k)), ψ₀=ψ_(id),   (9) where ψ_(id) is the identity transformation, v_(k) is a velocity vector field that follows the gradient of the cost functional to be minimized, and β is a displacement coefficient whose value can be adjusted to insure small displacements. The maximum displacement should be less than one pixel. To insure this, the maximum norm of the vector field v_(k) is computed, the vector field is normalized by this maximum norm, and β is the inverse of the maximum norm. The gradient v_(k) can be regularized using a fast recursive filtering technique that approximates a Gaussian smoothing.

The iterative scheme for EQ. (9) is repeated until convergence, and can be seen as a discretization (via a Taylor expansion) of a transport equation in an Eulerian frame:

$\begin{matrix} {{\frac{\partial\psi_{t}}{\partial t} = {{- D}\;{\psi_{t} \cdot v}}},{\psi_{0} = {\psi_{i\; d}.}}} & (10) \end{matrix}$ where Dψ_(t) stands for the Jacobian matrix of ψ_(t). Here, large deformations are possible because the regularization is applied to the velocity rather than the deformation, as is the case with evolving the level set representation.

The PDFs of the object and the background are computed during each iteration of the registration process. The template image I_(T) determines the inside of the region of interest and its background. The equations are:

$\begin{matrix} {{{p_{i\; n}(i)} = {\frac{1}{\Omega_{i\; n}}{\int_{\Omega}{\left( {I_{T} \cdot \psi} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},{{p_{out}(i)} = {\frac{1}{\Omega_{out}}{\int_{\Omega}{\left( {1 - {I_{T} \cdot \psi}} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},} & (11) \end{matrix}$ where i is an image intensity and |Ω_(in)|, |Ω_(out)| are the volumes of the corresponding domains. Implementation

A flowchart of a method for liver segmentation in digital medical images is shown in FIGS. 5 a-b. Referring now to FIG. 5 a, a method according to an embodiment of the invention begins at step 51 by providing a set of N training shapes {φ_(i)}_(i=1, . . . , N) trained from a set of manually segmented images, and a new image I to be segmented.

At step 51, the segmentation is automatically initialized. A point inside the liver can be found as follows: first compute an intensity histogram of the image to be segmented, then fit a Gaussian Mixture distribution to the intensity histogram. By doing so one can compute a mask corresponding to the liver intensity. This binary image is then convolved with a Gaussian kernel with a standard deviation proportional to the liver size. The pixel with the highest response is found and selected as the initialization point of the liver segmentation. This single point is sufficient for the initialization and does not have to be the center of mass.

At step 52, the energy functional

${E\left( {\alpha,h,\theta} \right)} = {{- {\int_{\Omega}{\begin{pmatrix} {{H\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)\log\; p_{i\; n}\ \left( {I(x)} \right)} +} \\ {\left( {1 + {H\left( {{\phi\alpha}\left( {{\theta\; x} + h} \right)} \right)}} \right)\log\;{p_{out}\left( {I(x)} \right)}} \end{pmatrix}{\mathbb{d}x}}}} - {\log\left( {\frac{1}{\sqrt{2\;\pi}N\;\sigma}{\sum\limits_{i = 1}^{N}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}} \right)}}$ is defined in terms of the training shapes and that incorporating shape prior information, where H is a Heaviside function of the training shapes incorporating translation parameters h ε R³ and rotation parameters θ ε [0,2π]³ that align the training shapes. In this energy functional, the training shapes are used to represent the level set representation φ of the boundary Γ as

${{\phi_{\alpha}(x)} = {\phi_{0} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}(x)}}}}},$ with mean shape

${\phi_{0}(x)} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}$ and eigenmodes {V_(i)(x)}_(i=1, . . . , n). This energy functional is minimized at step 53 using alternating gradient descents using EQS. (6) to yield values for θ, h, and α. At step 54, the resulting regions functions H_(φ)=H(φ_(α)(θx+h)) are used to initialize a binary template I_(T), and an incremental registration mapping ψ₀=ψ_(id) is initialized to the identity transformation.

Moving on to FIG. 5 b, the probability distribution functions (PDFs) p_(in) and p_(out) are computed at step 55 for the regions inside and outside the boundary Γ. At step 56, the vector field obtained from the variational gradient,

${v_{k} = {{\nabla\left( {I_{T} \cdot \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}},$ is computed, and is regularized with a Gaussian filter v_(k=G) _(σ)*v_(k), where “*” represents convolution at step 57. The displacement coefficient β is set at step 58 to a value based on the maximum norm of the vector field v_(k), as described above, that insures small displacements, and the incremental registration displacement is updated at step 59 as ψ_(k+1)=ψ_(k)∘(ψ_(id)+βv_(k)). At step 60, if the transformations ψ_(k) have converged, or a maximum number of iterations have been reached, the process terminates, otherwise, steps 55 to 59 are repeated. The resulting transformation ψ recovers local deformations and minimizes the cost functional E_(data)(I_(T)∘ψ) defined in EQ. (1).

The region statistics are computed dynamically at step 55 as the algorithm iterates. The probability density functions p_(in) and p_(out) are based on intensity histograms and are described by EQS. 11. According to an embodiment of the invention, a smooth version of the template I_(T) was used, where values vary between 0 and 255, with the contour at 127.

A regularization of the vector field v_(k) according to an embodiment of the invention is performed at step 57 using the Deriche's recursive filter, which has a linear complexity with respect to the number of voxels. A Deriche filter is an approximation of the Gaussian filtering. It is a separable filter that is composed of three sub-filters, one for every direction, which are applied one after the other. Every sub-filter is recursive using a second order exponential approximation.

An algorithm according to an embodiment of the invention is embedded in a coarse-to-fine strategy, where coarser solutions are propagated back up in the multi-resolution hierarchy. This reduces the computational cost by working with less data at lower resolutions. This also allows recovering large displacements, and helps avoiding local minima. According to an embodiment of the invention five levels of multi-resolutions were used.

Although a method according to an embodiment of the invention has been described in terms of CT images, methods according to other embodiments of the invention can be applied by those of skill in the art to images acquired from other modalities, such as magnetric resonance imaging, ultrasound, etc.

Experimental Results

To quantify the segmentation accuracy, results obtained from a method according to an embodiment of the invention were compared to a ground-truth. These experiments examined 30 CT images (data provided by MICCAI Workshop on 3D Segmentation) that have been manually segmented by radiological experts, working slice-by-slice in transversal view. A segmentation is defined as the entire liver including all internal structures. Among these images, twenty segmentations are available for training. The other ten images are used for testing. All images are enhanced with contrast agent and most of them are pathological.

In an approach according to an embodiment of the invention, the shape model is composed of 50 segmented livers, including the 20 training images described above. An algorithm according to an embodiment of the invention has proven robust to the initialization point. According to an embodiment of the invention, 30 modes of variation are used for the shape model. For the template matching, an exemplary, non-limiting regularization parameter value for σ is 2.0, and exemplary, non-limiting values for the number of iterations for the multi-resolution are, from high to low resolution, 0, 16, 32, 48 and 16.

Segmentation results are compared to the ground-truth using five metrics: the volumetric overlap, the relative absolute volume difference, the average symmetric absolute surface distance, the symmetric RMS surface distance and the maximum symmetric absolute surface distance. These metrics are evaluated by assigning a score to each test case (for details see http://mbi.dkfz-heidelberg.de/grand-challenge2007/sites/eval.htm). The score of each test case itself is the average of five scores, each scaled from 0 to 100. The maximum score is 100, and will only be obtained when the segmentation is exactly the same as the reference.

An approach according to an embodiment of the invention (Method A) was also compared to two alternatives. The first alternative uses the shape model fitting described above followed by an unconstrained level set evolution (Method B). The second alternative uses the mean shape of the liver as initialization and template matching (Method C). These three methods were applied to the training images. FIG. 1 is a table showing the score for every image in the training set for each of methods A, B, and C, where the numbers in bold correspond to the highest score. The table shown in FIG. 2 illustrates the average metrics and corresponding average scores on the 20 training cases for methods A, B, and C. The table of FIG. 2 indicates that an approach according to an embodiment of the invention gives overall better quantitative results than the other two. Contrary to the level set approach (Method B), an approach according to an embodiment of the invention applies the regularization to the deformation field. This allows segmentation of irregular shapes, that would be impossible with surface evolution techniques. The regularization is decorrelated from the intrinsic geometry of the template, which allows recovery of irregular shapes while avoiding leaks.

An approach according to an embodiment of the invention was validated on 10 test cases, which were not included in the shape model. The table of FIG. 3 shows the metrics and the scores compared to the ground-truth for all ten test cases. FIG. 4 shows the results of three different segmentations. Referring now to the figure, the top row depicts, from left to right, a sagittal, coronal and transversal slice from a relatively easy case, the middle row depicts the corresponding slices for an average case, and the bottom row depicts the corresponding slices for a relatively difficult case. The outline of the reference standard segmentation for selected figures is indicated by reference number 41, and the outline of the segmentation of a method according to an embodiment of the invention for the selected figures is indicated by reference number 42. For the sake of clarity, only those segmentation results that differed most clearly were indicated by the reference numbers.

An approach according to an embodiment of the invention scores 76 points for the easy case, which means that it performed roughly as good as a human. The lowest score is 54 and corresponds to an image with a tumor, which is considered as a hard case. Since an algorithm according to an embodiment of the invention relies on the intensity distribution inside the liver, it cannot include the whole tumor in the segmentation.

Approximate computation time is 324 seconds per image in average on a 2 GHz dual-core Intel processor. This can be reduced if necessary for clinical applications if lower accuracy is acceptable.

System

It is to be understood that embodiments of the present invention can be implemented in various forms of hardware, software, firmware, special purpose processes, or a combination thereof. In one embodiment, the present invention can be implemented in software as an application program tangible embodied on a computer readable program storage device. The application program can be uploaded to, and executed by, a machine comprising any suitable architecture.

FIG. 6 is a block diagram of an exemplary computer system for implementing a method for liver segmentation in digital medical images, according to an embodiment of the invention. Referring now to FIG. 6, a computer system 61 for implementing the present invention can comprise, inter alia, a central processing unit (CPU) 62, a memory 63 and an input/output (I/O) interface 64. The computer system 61 is generally coupled through the I/O interface 64 to a display 65 and various input devices 66 such as a mouse and a keyboard. The support circuits can include circuits such as cache, power supplies, clock circuits, and a communication bus. The memory 63 can include random access memory (RAM), read only memory (ROM), disk drive, tape drive, etc., or a combinations thereof. The present invention can be implemented as a routine 67 that is stored in memory 63 and executed by the CPU 62 to process the signal from the signal source 68. As such, the computer system 61 is a general purpose computer system that becomes a specific purpose computer system when executing the routine 67 of the present invention.

The computer system 61 also includes an operating system and micro instruction code. The various processes and functions described herein can either be part of the micro instruction code or part of the application program (or combination thereof) which is executed via the operating system. In addition, various other peripheral devices can be connected to the computer platform such as an additional data storage device and a printing device.

It is to be further understood that, because some of the constituent system components and method steps depicted in the accompanying figures can be implemented in software, the actual connections between the systems components (or the process steps) may differ depending upon the manner in which the present invention is programmed. Given the teachings of the present invention provided herein, one of ordinary skill in the related art will be able to contemplate these and similar implementations or configurations of the present invention.

While the present invention has been described in detail with reference to a preferred embodiment, those skilled in the art will appreciate that various modifications and substitutions can be made thereto without departing from the spirit and scope of the invention as set forth in the appended claims. 

What is claimed is:
 1. A method for automatically segmenting a liver in digital medical images, comprising the steps of: providing a 3-dimensional (3D) digital image I to be segmented, said image comprising a plurality of intensities associated with a 3D grid of points; providing a set of N training shapes {φ_(i)}_(i=1, . . . , N) for a liver trained from a set of manually segmented images; selecting a seed point to initialize said segmentation; representing a level set function φ_(α)(θx+h) of a liver boundary Γ in said image as ${{\phi_{\alpha}(x)} = {\phi_{0} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}(x)}}}}},{{{wherein}\mspace{14mu}{\phi_{0}(x)}} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}}$ is a mean shape, {V_(i)(x)}_(i=1, . . . , n) are eigenmodes wherein n<N, α_(i) are shape parameters corresponding to each training shape φ_(i), and h ε R³ and θ ε [0,2π]³ are translation and rotation parameters that align said training shapes; defining a first energy functional in terms of said level set functions φ_(α)(θx+h), wherein said first energy functional is ${E\left( {\alpha,h,\theta} \right)} = {{- {\int_{\Omega}{\begin{pmatrix} {{H\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)\log\; p_{i\; n}\ \left( {I(x)} \right)} +} \\ {\left( {1 + {H\left( {{\phi\alpha}\left( {{\theta\; x} + h} \right)} \right)}} \right)\log\;{p_{out}\left( {I(x)} \right)}} \end{pmatrix}{\mathbb{d}x}}}} - {\log\left( {\frac{1}{\sqrt{2\;\pi}N\;\sigma}{\sum\limits_{i = 1}^{N}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}} \right)}}$ wherein H is a Heaviside function whose value is 1 inside said boundary and 0 otherwise, the log term is a shape prior distribution with standard deviation σ, and p_(in), p_(out) are image intensity histogram functions inside and outside said boundary, respectively; minimizing said first energy functional to determine said shape, translation, and rotation parameters, wherein said shape, translation, and rotation parameters determine a shape template for said liver segmentation; defining a second energy functional of said shape template and a registration mapping weighted by image intensity histogram functions inside and outside said boundary; minimizing said second energy functional to determine said registration mapping, wherein said registration mapping recovers local deformations of said liver; and setting σ to twice an average Euclidean distance between each training shape and its closet neighbor in a subspace with dimension n.
 2. The method of claim 1, wherein minimizing said first energy functional comprising initializing said shape parameters α_(i) to a mean shape, and solving $\quad\left\{ \begin{matrix} {\frac{\mathbb{d}\alpha}{\mathbb{d}t} = {{\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{V\left( {{\theta\; x} + h} \right)}{e(x)}\ {\mathbb{d}x}}} + {\frac{1}{\sigma^{2}}\frac{\sum\limits_{i = 1}^{N}{\left( {\alpha_{i} - \alpha} \right)K_{i}}}{\sum\limits_{i = 1}^{N}K_{i}}}}} \\ {\frac{\mathbb{d}h}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}}{e(x)}\ {\mathbb{d}x}}}} \\ {\frac{\mathbb{d}\theta}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}\left( {{{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}} \cdot {\nabla_{\theta}\theta}}\; x} \right){e(x)}\ {\mathbb{d}x}}}} \end{matrix} \right.$ with a finite difference scheme, wherein δ is a Dirac delta function, ${{{\mathbb{e}}(x)} = {\log\left\lbrack \frac{p_{out}\left( {I(x)} \right)}{p_{i\; n}\left( {I(x)} \right)} \right\rbrack}},{K_{i} = {\frac{1}{\sqrt{2\;\pi}}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}},\text{}{{{and}V} = \left( {V_{1},\ldots\mspace{14mu},V_{n}} \right)},\mspace{14mu}{and}$ restricting computations to a narrow band around a zero crossing of φ_(α).
 3. The method of claim 1, wherein said second energy functional is E_(data)(I_(T) ∘ ψ) = −∫_(Ω)((I_(T) ∘ ψ)log_(in)p(I(x)) + (1 − I_(T) ∘ ψ)log  p_(out)(I(x))) 𝕕x, wherein ψ:Ω→Ω is a registration transformation on a domain Ω of said image I, I_(T)(x) = H(ϕ_(α)(θ x + h)),  I_(T) ∘ ψ is a warped binary template, ∘ is the composition operator, and p_(in), p_(out) are said image intensity histogram functions inside and outside said boundary, respectively.
 4. The method of claim 3, wherein minimizing said second energy functional comprises building a sequence of transformations (ψ_(k))_(k=0, . . . , +∞) that approximate ψ by composition of small displacements, ψ_(k + 1) − ψ_(k) ∘ (ψ_(id) + β v_(k)), wherein ψ_(k) is initialized to ψ₀=ψ_(id), the registration identity transformation, v_(k) is a velocity vector field defined from ${v = {{\nabla\left( {I_{T} \circ \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}},$ and β is a displacement coefficient.
 5. The method of claim 4, further comprising regularizing v_(k) with a recursive Gaussian filter.
 6. The method of claim 4, further comprising adjusting the value of β to an inverse of a maximum norm of said vector field v_(k).
 7. The method of claim 4, further comprising computing ${{p_{i\; n}(i)} = {\frac{1}{\Omega_{i\; n}}{\int_{\Omega}{\left( {I_{T} \circ \psi} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},{{p_{out}(i)} = {\frac{1}{\Omega_{out}}{\int_{\Omega}{\left( {1 - {I_{T} \circ \psi}} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},$ inside and outside said boundary wherein δ is a Dirac delta function, i is an image intensity value and |Ω_(in)|, |Ω_(out)| are volumes of corresponding domains inside and out outside said boundary.
 8. The method of claim 4, further comprising embedding said minimization of said second energy functional in a coarse-to-fine strategy, wherein a coarse resolution solution from one step is used to initialize a finer resolution solution at a next step.
 9. The method of claim 1, wherein n is determined by analyzing the eigenvalues to include those eigenmodes that contribute a predetermined percentage to said level set function φ_(α).
 10. A method for automatically segmenting a liver in digital medical images, comprising the steps of: providing a 3-dimensional (3D) digital image I to be segmented, said image comprising a plurality of intensities associated with a 3D grid of points; providing a set of N training shapes {φ_(i)}_(i=1, . . . , N) for a liver trained from a set of manually segmented images; selecting a seed point to initialize said segmentation; representing a level set function φ_(α)(θx+h) of a liver boundary Γ in said image as ${{\phi_{\alpha}(x)} = {\phi_{0} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}(x)}}}}},{wherein}$ ${\phi_{0}(x)} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}$ is a mean shape, {V_(i)(x)}_(i=1, . . . , n) are eigenmodes wherein n<N, α_(i) are shape parameters corresponding to each training shape φ_(i), and h ε R³ and θ ε [0,2π]³ are translation and rotation parameters that align said training shapes; and minimizing a first energy functional E_(data)(I_(T) ∘ ψ) = −∫_(Ω)((I_(T) ∘ ψ)log_(in)p(I(x)) + (1 − I_(T) ∘ ψ)log  p_(out)(I(x))) 𝕕x, to solve for ψ by building a sequence of transformations (ψ_(k))_(k=0, . . . , +∞) that approximate ψ by composition of small displacements, ψ_(k + 1) = ψ_(k) ∘ (ψ_(id) + β v_(k)), wherein ψ:Ω→Ω is a registration transformation on a domain Ω of said image I, I_(T)(x) = H(ϕ_(α)(θ x + h)), H is a Heaviside function whose value is 1 inside said boundary and 0 otherwise, I_(T) ∘φ is a warped binary template, ∘ is the composition operator, and p_(in), p_(out) are image intensity histogram functions inside and outside said boundary, respectively, v_(k) is a velocity vector field defined as ${v = {{\nabla\left( {I_{T} \circ \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}},$ and β is a displacement coefficient.
 11. The method of claim 10, wherein ψ_(k) is initialized to ψ₀=ψ_(id), the registration identity transformation.
 12. The method of claim 10, further comprising minimizing a second energy functional E(α,h,θ)=−∫_(Ω)(H(φ _(α(θx+) h))log P _(in)(I(x))+(1+H)φα(θx+h)))log P _(out)(I(x)))dx ${E\left( {\alpha,h,\theta} \right)} = {{- {\int_{\Omega}{\begin{pmatrix} {{H\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)\log\; p_{i\; n}\ \left( {I(x)} \right)} +} \\ {\left( {1 - {H\left( {{\phi\alpha}\left( {{\theta\; x} + h} \right)} \right)}} \right)\log\;{p_{out}\left( {I(x)} \right)}} \end{pmatrix}{\mathbb{d}x}}}} - {\log\left( {\frac{1}{\sqrt{2\;\pi}N\;\sigma}{\sum\limits_{i = 1}^{N}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}} \right)}}$ with respect to α, θ, and h, wherein I_(T)(x)=H (φ_(α)(θx+h)) is obtained.
 13. The method of claim 10, wherein selecting a seed point comprises: computing an intensity histogram of said image; fitting a Gaussian mixture distribution to the intensity histogram to compute a mask corresponding to a liver intensity; convolving said mask with a Gaussian kernel with a standard deviation proportional to a size of said liver; and selecting a pixel with a highest response said seed point.
 14. A non-transitory program storage device readable by a computer, tangibly embodying a program of instructions executable by the computer to perform the method steps for automatically segmenting a liver in digital medical images, said method comprising the steps of: providing a 3-dimensional (3D) digital image I to be segmented, said image comprising a plurality of intensities associated with a 3D grid of points; providing a set of N training shapes {φ_(i)}_(i=1, . . . , N) for a liver trained from a set of manually segmented images; selecting a seed point to initialize said segmentation; representing a level set function φ_(α)(θx+h) of a liver boundary Γ in said image as ${{\phi_{\alpha}(x)} = {\phi_{0} + {\sum\limits_{i = 1}^{n}{\alpha_{i}{V_{i}(x)}}}}},{wherein}$ ${\phi_{0}(x)} = {\frac{1}{N}{\sum\limits_{i = 1}^{N}{\phi_{i}(x)}}}$ is a mean shape, {V_(i)(x)}_(i=1, . . . , n) are eigenmodes wherein n<N, α_(i) are shape parameters corresponding to each training shape φ_(i), and h ε R³ and θ ε [0.2π]³ are translation and rotation parameters that align said training shapes; defining a first energy functional in terms of said level set functions φ_(α)(θx+h); minimizing said first energy functional to determine said shape, translation, and rotation parameters, wherein said shape, translation, and rotation parameters determine a shape template for said liver segmentation; defining a second energy functional of said shape template and a registration mapping weighted by image intensity histogram functions inside and outside said boundary; and minimizing said second energy functional to determine said registration mapping, wherein said registration mapping recovers local deformations of said liver, wherein n is determined by analyzing the eigenvalues to include those eigenmodes that contribute a predetermined percentage to said level set function φα.
 15. The computer readable program storage device of claim 14, wherein said first energy functional is E(α,h,θ)=−∫_(Ω)(H(φ_(α)(θx+h))log P _(in)(I(x))+(1+H(φα(θx+h)))log P _(out)(I(x)))dx ${E\left( {\alpha,h,\theta} \right)} = {{- {\int_{\Omega}{\begin{pmatrix} {{H\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)\log\; p_{i\; n}\ \left( {I(x)} \right)} +} \\ {\left( {1 - {H\left( {{\phi\alpha}\left( {{\theta\; x} + h} \right)} \right)}} \right)\log\;{p_{out}\left( {I(x)} \right)}} \end{pmatrix}{\mathbb{d}x}}}} - {\log\left( {\frac{1}{\sqrt{2\;\pi}N\;\sigma}{\sum\limits_{i = 1}^{N}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}} \right)}}$ wherein H is a Heaviside function whose value is 1 inside said boundary and 0 otherwise, the log term is a shape prior distribution with standard deviation σ, and p_(in), p_(out) are image intensity histogram functions inside and outside said boundary, respectively.
 16. The computer readable program storage device of claim 15, the method further comprising setting σ to twice an average Euclidean distance between each training shape and its closest neighbor in a subspace with dimension n.
 17. The computer readable program storage device of claim 15, wherein minimizing said first energy functional comprising initializing said shape parameters α_(i) to a mean shape, and solving $\quad\left\{ \begin{matrix} {\frac{\mathbb{d}\alpha}{\mathbb{d}t} = {{\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{V\left( {{\theta\; x} + h} \right)}{e(x)}\ {\mathbb{d}x}}} + {\frac{1}{\sigma^{2}}\frac{\sum\limits_{i = 1}^{N}{\left( {\alpha_{i} - \alpha} \right)K_{i}}}{\sum\limits_{i = 1}^{N}K_{i}}}}} \\ {\frac{\mathbb{d}h}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}}{e(x)}\ {\mathbb{d}x}}}} \\ {\frac{\mathbb{d}\theta}{\mathbb{d}t} = {\int_{\Omega}{{\delta\left( {\phi_{\alpha}\left( {{\theta\; x} + h} \right)} \right)}\left( {{{\nabla{\phi_{\alpha}\left( {{\theta\; x} + h} \right)}} \cdot {\nabla_{\theta}\theta}}\; x} \right){e(x)}\ {\mathbb{d}x}}}} \end{matrix} \right.$ with a finite difference scheme, wherein δ is a Dirac delta function, ${{{\mathbb{e}}(x)} = {\log\left\lbrack \frac{p_{out}\left( {I(x)} \right)}{p_{i\; n}\left( {I(x)} \right)} \right\rbrack}},{K_{i} = {\frac{1}{\sqrt{2\;\pi}}{\exp\left( {- \frac{\left( {\alpha - \alpha_{i}} \right)^{2}}{2\;\sigma^{2}}} \right)}}},\text{}{{{and}V} = \left( {V_{1},\ldots\mspace{14mu},V_{n}} \right)},\mspace{14mu}{and}$ restricting computations to a narrow band around a zero crossing of φ_(α).
 18. The computer readable program storage device of claim 14, wherein said second energy functional is E_(data)(I_(T) ∘ ψ) = −∫_(Ω)((I_(T) ∘ ψ)log_(in)p(I(x)) + (1 − I_(T) ∘ ψ)log  p_(out)(I(x))) 𝕕x, wherein ψ:Ω→Ω is a registration transformation on a domain Ω of said image I, I_(T)(x) = H(ϕ_(α)(θ x + h)),  I_(T) ∘ ψ is a warped binary template, ∘ is the composition operator, and p_(in), p_(out) are said image intensity histogram functions inside and outside said boundary, respectively.
 19. The computer readable program storage device of claim 18, wherein minimizing said second energy functional comprises building a sequence of transformations (ψ_(k))_(k=0, . . . , +∞) that approximate ψ by composition of small displacements, ψ_(k + 1) = ψ_(k) ∘ (ψ_(id) + β v_(k)), wherein ψ_(k) is initialized to ψ₀=ψ_(id), the registration identity transformation, v_(k) is a velocity vector field defined from ${v = {{\nabla\left( {I_{T} \circ \psi} \right)}\left( {\log\frac{p_{i\; n}\left( {I(x)} \right)}{p_{out}\left( {I(x)} \right)}} \right)}},$ and β is a displacement coefficient.
 20. The computer readable program storage device of claim 19, the method further comprising regularizing v_(k) with a recursive Gaussian filter.
 21. The computer readable program storage device of claim 19, the method further comprising adjusting the value of β to an inverse of a maximum norm of said vector field v_(k).
 22. The computer readable program storage device of claim 19, the method further comprising computing ${{p_{i\; n}(i)} = {\frac{1}{\Omega_{i\; n}}{\int_{\Omega}{\left( {I_{T} \circ \psi} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},{{p_{out}(i)} = {\frac{1}{\Omega_{out}}{\int_{\Omega}{\left( {1 - {I_{T} \circ \psi}} \right){\delta\left( {{I(x)} - i} \right)}\ {\mathbb{d}x}}}}},$ inside and outside said boundary, wherein δ is a Dirac delta function, i is an image intensity value and |Ω_(in)|, |Ω_(out)| are volumes of corresponding domains inside and outside said boundary.
 23. The computer readable program storage device of claim 19, the method further comprising embedding said minimization of said second energy functional in a coarse-to-fine strategy, wherein a coarse resolution solution from one step is used to initialize a finer resolution solution at a next step. 